#ifndef mechanoidPanelAdaptor_h
#define mechanoidPanelAdaptor_h

#include "simodo/shell/panel/PanelAdaptor_interface.h"
#include "simodo/shell/access/AdaptorModeling_interface.h"
#include "simodo/shell/access/Access_interface.h"

#include "widget/mechanoid.h"
#include "widget/log.h"
#include "widget/datapanel.h"

namespace shell  = simodo::shell;

class mechanoidPanelAdaptor :   public QObject,
                                public shell::PanelAdaptor_interface,
                                public shell::AdaptorModeling_interface
{
    shell::Access_interface &       _shell;
    mechanoid *                     _mechanoid;
    LogWidget *                     _logWidget;
    DataPanel *                     _dataPanel;
    QWidget *                       _widget;

    QString                         _title;

public:
    mechanoidPanelAdaptor(shell::Access_interface & shell);
    ~mechanoidPanelAdaptor();

public:
    // shell::PanelAdaptor_interface
    virtual QWidget * panel_widget() override { return _widget; }
    virtual QString title() const override;
    virtual void reset() override {}
    virtual void changedCurrentDocument(const QString & ) override {}
    virtual bool activateService(shell::service_t ) override { return false; }
    virtual bool acceptData(const QJsonObject & ) override { return false; }
    virtual shell::AdaptorModeling_interface * getModelingInterface() override { return this; }

public:
    // shell::PanelAdaptorModeling_interface
    virtual void started() override;
    virtual void paused() override;
    virtual void stoped() override;
    virtual bool acceptData(const QString & func, QVector<QString> & data) override;
    
};

#endif // mechanoidPanelAdaptor_h
